package com.zhuangjie.coupon.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhuangjie
 * @since 2024-02-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("coupon_order")
@ApiModel(value = "CouponOrder对象", description = "")
public class CouponOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("优惠卷订单id")
    @TableField("id")
    private Long id;

    @ApiModelProperty("购买的用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("优惠卷产品id")
    @TableField("coupon_product_id")
    private Long couponProductId;

    @ApiModelProperty("支付的金额")
    @TableField("payment_amount")
    private BigDecimal paymentAmount;

    @ApiModelProperty("状态（0待支付，1已购买 -1未使用退购 -2已取消）")
    @TableField("state")
    private Byte state;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
